package com.malethan.seemorej.taglib;

import com.malethan.seemorej.taglib.elements.Upload;

/**
 * @author Elwyn Malethan
 */
public class UploadTag extends ElementTag {
    //----------------------------------------------------------------------- Static Properties and Constants
    //----------------------------------------------------------------------- Static Methods
    //----------------------------------------------------------------------- Instance Properties

    String size;
    String maxlength;

    //----------------------------------------------------------------------- Constructors
    //----------------------------------------------------------------------- Getters and Setters

    public void setSize(String size) {
        this.size = size;
    }

    public void setMaxlength(String maxlength) {
        this.maxlength = maxlength;
    }

    //----------------------------------------------------------------------- Instance Methods

    protected String constructElement() {
        Upload upload = new Upload();

        setCommonAttributes(upload);

        upload.setSize(size);
        upload.setMaxlength(maxlength);

        return upload.toString();
    }

    public void release() {
        super.release();
        this.size = null;
        this.maxlength = null;
    }
}
